home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 4 / Gold Medal Software - Volume 4 (Gold Medal) (1994).iso / utils1 / 622_step.arj / SETUP.BAT < prev   
DOS Batch File  |  1994-05-31  |  5KB  |  181 lines

  1. @echo off
  2. REM  This batch file expands the MS-DOS 6.22 Step-Up files and
  3. REM  then runs MS-DOS 6.22 Setup.
  4.  
  5. if %1'==RESTART' goto restart
  6. if not exist 1MSDOS62.EXE goto missing
  7.  
  8. REM ----- Do expansion of a split archive -----
  9. :multi
  10. md C:\stepup
  11. if not exist c:\stepup\nul goto dir_err
  12.  
  13. REM Copy this batch file to the hard disk and transfer control to
  14. REM it so user can change floppies.
  15.  
  16. echo Preparing MS-DOS 6.22 Setup...
  17.  
  18. REM Retrieve this batch file's name from the command line
  19. REM
  20. if exist %0 goto as_is
  21.  
  22. copy %0.bat c:\stepup\msstepup.bat
  23. c:\stepup\msstepup.bat RESTART
  24.  
  25. :as_is
  26. copy %0 c:\stepup\msstepup.bat
  27. c:\stepup\msstepup.bat RESTART
  28.  
  29. :restart
  30. echo Unpacking MS-DOS 6.22 Step-Up files...
  31. if not exist c:\stepup\README.NOW   copy README.NOW c:\stepup > nul
  32. 1msdos62.exe -n -o c:\stepup
  33. if errorlevel 1 goto exp_err
  34.  
  35. :check2
  36. if exist 2MSDOS62.EXE goto onward2
  37. echo.
  38. echo Insert Disk 2 and then press ENTER.
  39. echo.
  40. pause>nul
  41. goto check2
  42.  
  43. :onward2
  44. echo Continuing... unpacking MS-DOS 6.22 Step-Up files...
  45. 2msdos62.exe -n -o c:\stepup
  46. if errorlevel 1 goto exp_err
  47.  
  48. :check3
  49. if exist 3MSDOS62.EXE goto onward3
  50. echo.
  51. echo Insert Disk 3 and then press ENTER.
  52. echo.
  53. pause>nul
  54. goto check3
  55.  
  56. :onward3
  57. echo Continuing... unpacking MS-DOS 6.22 Step-Up files...
  58. 3msdos62.exe -n -o c:\stepup
  59. if errorlevel 1 goto exp_err
  60.  
  61. REM ------ Once the archives are unpacked, run the commands ------
  62.  
  63. :unpacked
  64. c:
  65. cd \stepup
  66.  
  67. :domksys
  68. echo.
  69. echo.
  70. echo Starting the MAKESYS utility...
  71. makesys
  72. if errorlevel 1 goto mksys_err
  73. echo.
  74. echo.
  75. echo Starting MS-DOS 6.22 Setup...
  76. REM LOCALIZE HERE - MS-DOS Setup Program Filename
  77. setup.exe
  78. REM Setup will reboot, so batch processing at this point indicates a
  79. REM setup failure.
  80. goto setup_err
  81.  
  82.  
  83. REM ----- Error messages ------
  84.  
  85. :missing
  86. echo.
  87. echo Cannot find the first MS-DOS 6.22 Step-Up archive file.
  88. echo.
  89. echo The archive file is named 1MSDOS62.EXE.
  90. echo
  91. echo To work properly, the SETUP.BAT file and the archive files  
  92. echo must be located in the same directory. (Do not place these
  93. echo files in the directory that contains your MS-DOS 6.x files.)
  94. echo.
  95. goto exit
  96.  
  97. :dir_err
  98. echo.
  99. echo Cannot create the temporary MS-DOS 6.22 Step-Up directory (C:\STEPUP).
  100. echo.
  101. echo Make sure that drive C does not already contain a file or directory 
  102. echo named C:\STEPUP. Also, make sure that the root directory of drive C
  103. echo contains fewer than 512 files and that drive C is not write-protected.
  104. echo.
  105. goto exit
  106.  
  107. REM ---- Extraction errors ----
  108.  
  109. :exp_err
  110. echo.
  111. echo Could not extract the MS-DOS 6.22 Step-Up files.
  112. echo.
  113. if errorlevel 50 if not errorlevel 51 goto exp_spc
  114. if errorlevel 13 if not errorlevel 14 goto exp_bad
  115. if errorlevel 4 if not errorlevel 9 goto exp_mem
  116.  
  117. REM other error...
  118. echo Unable to continue.
  119. echo.
  120. goto exit
  121.  
  122. :exp_spc
  123. echo There is not enough free space on drive C.
  124. echo.
  125. echo To install MS-DOS 6.22, drive C must contain at least 7 MB 
  126. echo of free space.
  127. echo.
  128. goto exit
  129.  
  130. :exp_bad
  131. echo The archive file (1MSDOS62.EXE, 2MSDOS62.EXE or 3MSDOS62.EXE) 
  132. echo might be corrupted.
  133. echo.
  134. echo To continue, obtain a new copy of the MS-DOS 6.22 archive files.
  135. echo.
  136. goto exit
  137.  
  138. :exp_mem
  139. echo There is not enough free conventional memory to extract the 
  140. echo MS-DOS 6.22 Step-Up files. 
  141. echo.
  142. echo To continue, edit your CONFIG.SYS or AUTOEXEC.BAT files and use
  143. echo the REM command to temporarily disable any unnecessary device 
  144. echo drivers or memory-resident programs. Then, restart your computer 
  145. echo and run SETUP.BAT again.
  146. echo.
  147. goto exit
  148.  
  149. REM ---- MAKESYS errors ----
  150.  
  151. :mksys_err
  152. echo.
  153. echo.
  154. echo The MAKESYS utility could not complete. For more information, 
  155. echo see the MAKESYS section of the README.NOW file.
  156. echo.
  157. echo When you have read the README.NOW file and are ready to try again,
  158. echo change to the C:\STEPUP directory and type MAKESYS. If MAKESYS 
  159. echo completes successfully, then type SETUP at the command prompt.
  160. echo You do not need to run this batch file (SETUP.BAT) again.
  161. echo.
  162. goto exit
  163.  
  164. REM ---- MS-DOS Setup error ----
  165.  
  166. :setup_err
  167. echo.
  168. echo MS-DOS 6.22 Setup could not complete. 
  169. echo.
  170. echo Follow the instructions in Setup's error message (if any).
  171. echo When you are ready to try running Setup again, change to the 
  172. echo C:\STEPUP directory and type SETUP at the command prompt. 
  173. echo You do not need to run this batch file (SETUP.BAT) again.
  174. echo.
  175. echo If you quit Setup by pressing F3, you can restart it
  176. echo by changing to the C:\STEPUP directory and typing SETUP.
  177. echo.
  178. goto exit
  179.  
  180. :exit
  181.